Skip to content

Conversation

@trusktr
Copy link

@trusktr trusktr commented May 8, 2023

I felt like the formatting of the grammar was a little difficult to read, namely the function/method calls, so I formatted them and took out the arguments lists into a shared fragment. I also formatted the rest of the file using Langium's default grammar formatter.

The new formatting is also closer to how JavaScript/TypeScript people format code.

Sidenote, the formatter wants to un-indent the comment, which was out of my controls:

    ({infer MemberCall.previous=current} 
        "." element=[NamedElement:ID] ( FunctionCallArguments )? 
    // Chained function call
        | ( FunctionCallArguments )
    )*;

The formatter would need a tweak so that it will instead do this:

    ({infer MemberCall.previous=current} 
        "." element=[NamedElement:ID] ( FunctionCallArguments )? 
        // Chained function call
        | ( FunctionCallArguments )
    )*;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant